package cz.muni.fi.pa165.soap.client;

import java.util.Locale;
import java.util.ResourceBundle;
import javax.swing.JFrame;

/**
 *
 * @author shifty
 */
public final class Client {
    
    public static int WIDTH=500;
    public static int HEIGHT=500;
    public static int ON_CLOSE=JFrame.EXIT_ON_CLOSE;
    
    private MainFrame client;
    
    public static void main(String[] args) {
        javax.swing.SwingUtilities.invokeLater(new Runnable() {
            @Override
            public void run() {
                new Client();
            }
        });
    }
    
    public Client() {
        Locale locale = Locale.getDefault();

        if(locale != null && locale.getLanguage().equals("sk")) {
            locale = new Locale("sk");
        } else {
            locale = Locale.ENGLISH;
        }
        
        ResourceBundle rb = ResourceBundle.getBundle("bundle", locale);
        
        client = new MainFrame(rb);
        
        setProperties();
        
    }

    public void setProperties() {
        client.setSize(WIDTH, HEIGHT);
        client.setVisible(true);
        client.setDefaultCloseOperation(ON_CLOSE);
    }
    
}
